package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProviderMapper;
import com.ruoyi.system.domain.Provider;
import com.ruoyi.system.service.IProviderService;

/**
 * 供货商格Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-11
 */
@Service
public class ProviderServiceImpl implements IProviderService 
{
    @Autowired
    private ProviderMapper providerMapper;

    /**
     * 查询供货商格
     * 
     * @param id 供货商格主键
     * @return 供货商格
     */
    @Override
    public Provider selectProviderById(Long id)
    {
        return providerMapper.selectProviderById(id);
    }

    /**
     * 查询供货商格列表
     * 
     * @param provider 供货商格
     * @return 供货商格
     */
    @Override
    public List<Provider> selectProviderList(Provider provider)
    {
        return providerMapper.selectProviderList(provider);
    }

    /**
     * 新增供货商格
     * 
     * @param provider 供货商格
     * @return 结果
     */
    @Override
    public int insertProvider(Provider provider)
    {
        return providerMapper.insertProvider(provider);
    }

    /**
     * 修改供货商格
     * 
     * @param provider 供货商格
     * @return 结果
     */
    @Override
    public int updateProvider(Provider provider)
    {
        return providerMapper.updateProvider(provider);
    }

    /**
     * 批量删除供货商格
     * 
     * @param ids 需要删除的供货商格主键
     * @return 结果
     */
    @Override
    public int deleteProviderByIds(Long[] ids)
    {
        return providerMapper.deleteProviderByIds(ids);
    }

    /**
     * 删除供货商格信息
     * 
     * @param id 供货商格主键
     * @return 结果
     */
    @Override
    public int deleteProviderById(Long id)
    {
        return providerMapper.deleteProviderById(id);
    }
}
